cmake_minimum_required(VERSION 3.10)
project(rtspService1 CXX)

set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

add_executable(${PROJECT_NAME} main.cpp)

if(WIN32)
    target_link_libraries(rtspService1 ws2_32)
    if(MSVC)
        target_compile_options(rtspService1 PRIVATE /wd4996)
    else()
        target_compile_options(rtspService1 PRIVATE -Wno-deprecated-declarations)
    endif()
else()
    # Linux环境链接其他库
    target_link_libraries(rtspService1 pthread)
endif()